package com.goods.service.detailservice;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.goods.dao.detaildao.DetailMapper;
import com.goods.pojo.Detail;

@Service
public class DetailServiceImpl implements DetailService {
	@Resource
	private DetailMapper detailmapper;

	public List<Detail> getAllDetail(Detail detail)throws Exception {
		return detailmapper.getAllDetail(detail);
	}

	public int getAllDetailCount(Detail detail)throws Exception {
		return detailmapper.getAllDetailCount(detail);
	}

	public Detail getGoodById(String id)throws Exception {
		System.out.println("****"+id);
		return detailmapper.getGoodById(Integer.valueOf(id));
		
	}

	public int updateNumByIdNum(int num, int id)throws Exception{
		return detailmapper.updateNumByIdNum(num, id);
	}
}
